
package com.roy.dsframework.jdbc.service.impl;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.roy.dsframework.jdbc.dao.AccountMapper;
import com.roy.dsframework.jdbc.model.domain.Account;
import com.roy.dsframework.jdbc.service.AccountService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @Description 服务类实现
* @Author liguang
* @Date 2024-05-25
*/
@Service
@AllArgsConstructor
@Slf4j
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements AccountService {


    @Override
    @DS("write")
    public List<Account> getAllAccount() {
        LambdaQueryWrapper<Account> wrapper = new LambdaQueryWrapper<>();
        return baseMapper.selectList(wrapper);
    }
}
